package com.springboot.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {
    @Value("${myapp.username}")
    private String name ;
    @Value("${myapp.password}")
    private String password ;
    @Value("${myapp.age:50}")
    private String appName;

    public void show(){
        System.out.println("name:"+name+"  password:"+password +"  appName:"+appName);
    }
}
